Search results for query: *

  • Users: PwUP
  • Order by date
  1. P

    Compile code on the fly

    Ok the second way seems to be easier, but i can't do it through the CompilerParameters, right? the EmbeddedResources property only accepts strings of filenames. So how may i embed an image directly?
  2. P

    Compile code on the fly

    Ok i succesfully compiled the exe with the resource file. Now i don't understand how to acces to my resx. This is the code i use to compile the resource file: Dim writer As New System.Resources.ResXResourceWriter("resources.resx") Dim im As Image = Image.FromFile("poly.bmp")...
  3. P

    Creating a Class by its name as string

    Ok i found out i need an overload function of Activator.CreateInstanceFrom. This is my code: Public Class ClasseX Public Sub New() MsgBox("U Created me!") End Sub End Class Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)...
  4. P

    Question Paint program Problem (graphics dissapearing)

    I use this method to draw stuff and it functions to me very well First of all i set DoubleBuffered property of the form where i draw to true, than: Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs) e.Graphics.DrawLine(0,0,100,100) 'example draw MyBase.OnPaint(e)...
  5. P

    Creating a Class by its name as string

    I don't understand how to use it for my task. May you give me some other tip? I'll be grateful to you!
  6. P

    Creating a Class by its name as string

    I'm going to show you an example of what i mean, Public Class ClassX Public Sub New() MsgBox("You created me!") End Sub End Class [...] Dim class As Object class = CreateClassByName("ClassX") 'and "class = New ClassX()" would be the same Is it possible?
  7. P

    Compile code on the fly

    Ok, i'll give it a try, thanks.
  8. P

    Compile code on the fly

    Hi, i'm here with a new problem... Is there a way to compile resources like images within the exe?
  9. P

    Compile code on the fly

    Sorry for the double post, i realized form1 is a class so i decleared it and i succesfully used its events. Thanks for the replies, JohnH. For who has my same trouble, here is the solution: Imports System Imports System.Windows.Forms Imports System.Drawing Imports Microsoft.VisualBasic Public...
  10. P

    Compile code on the fly

    Ok, this functions! At last, how may I access to the events of the Form I made? Here is my code in "Form1.vb" Imports System Imports System.Windows.Forms Imports System.Drawing Module Class3 Sub Main() Dim Form1 as Form = New Form() Dim btn As Button = New Button() btn.Text = "button"...
  11. P

    Compile code on the fly

    MSDN says: "Unless you are creating a Windows Forms application, you must write the Main procedure for applications that run on their own" and I want to compile a Windows Forms Application! Anyway, I also read there: In Main, you can determine which form is to be loaded first when the program...
  12. P

    Compile code on the fly

    Hi there, i was trying to accomplish to that task with codedom classes, but i can't compile my code! May you post here an example which does succesfully that? I already searched through this forum and the web but i still can't even make a step towards the solution. Thanks in advance! Here are...
  13. P

    Trouble with api CreateWindowEx function

    Hi all. I'm here with a new trouble, as you can see on the title. I apologize for posting on VB general discussion, i haven't found a better place, feel free to move this topic wheter this is not the appropriate section. Anyway, i'm trying to create a button control with CreateWindowEx function...
  14. P

    Question ReadProcessMemory trouble

    Hi, i found out this class: Imports System Imports System.Collections.Generic Imports System.Diagnostics Imports System.Linq Imports System.Runtime.InteropServices Imports System.Text Imports Microsoft.Win32.SafeHandles Namespace SomeProjectName.Classes Public Class API #Region "API Class...
  15. P

    Question Input from another form

    Whant exactly you aren't able to do? Once selected the "add new" item in combobox1 of form1, you simply open the new form. form2.show() Note that you must have already made that form and named it form2. (form2 is the one with a textbox and a button). Now, in the button click event of form2: if...
  16. P

    Question ReadProcessMemory trouble

    Hi :D I'm here with a new problem! This time i have to read a string from a textbox on an other window (not one form in my project). I've got the correct address to that string memory, i can always get the correct handle and process of the window, but i don't know how to use them with...
  17. P

    Transparent Background

    It doesen't work. I'm thinking about making only one class and use there every other classes' draw actions. :( Anyway thank you and Robert_Zenz
  18. P

    Transparent Background

    Thanks, but nothing changes :mad: I don't really understand why.. This is my class code Public Class drawer Inherits Control Dim steps As Integer = 0 Private Sub drawer_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint...
  19. P

    Transparent Background

    Hi. I have a class which draws stuff like lines, rectangles ad images in a form. But it also draw a background rectangle before other things. How may i disable it? (I've taken a screenshot to show you better what i mean: When i create my second class it draws a gray rectangle, as well as the...
  20. P

    Question String Evalutator

    Hi! I've been searching so far for a way to read a string and execute it as vb code. eg. string_evalutate("dim a as integer = 23") should make a new variable a with 23. Or string_evalutate("MsgBox(a.tostring)") should show a message with input "23". I've already searched on the internet :( I...
Back
Top