|
I am a newbie of vb.net.Now i wanna draw some electronic circuit in vb.net.Anyway, i have found Image Editor tool which seems to be usable with this kinda drawing.Unfortunately, i cannot click it, They cannot be clicked to use.Could you please help me how to use it??
Thanks in advance.
|
|
|
|
|
I have no idea what tool you're talking about. To do what you want, you need to handle the paint event of your control/form, and draw your circuit. You can use the mouse events to handle drawing items and if you want to click on parts and select/interact with them, you need to keep each item in a list and handle selection from there.
vuthcam wrote: I am a newbie of vb.net
This probably means you didn't understand a thing I just said. That would be because an electronic drawing program is not a suitable choice for a first programming task. You probably need to write a few simpler programs to build the skill level necessary to approach this task. Ideally, you'd write some console programs first, although in my experience most people are too impatient to learn to code properly nowadays, especially in the .NET space, and doubly so in VB.NET. However, that's good advice, and you should consider taking it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I understand yours. Although i am a newbie it doesn't mean i understand nothing. Newbie of mine means than i don't have enough ability yet to code some big pro. But this i think it is something usual. We just draw the static pic of that circuit then to code it.
As i have said, i have found some kinda tools which is suitable to be used but i reall wonder that i cannot use it...ok i'll post something in my blog.I hope you can spend time for helping me ...thanks...it is very kind of you..
My Blog: www.vuth-it.blogspot.com
|
|
|
|
|
vuthcam wrote: Although i am a newbie it doesn't mean i understand nothing.
Fair enough - there are different ways to take the word 'newbie' and a lot of people are coding for the first time ever and trying to write complex code that is beyond them. I didn't mean to talk down to you, just to give good advice.
vuthcam wrote: As i have said, i have found some kinda tools which is suitable to be used but i reall wonder that i cannot use it
For this task you need to build the sort of framework I suggested, I would be surprised if you found something that did exactly what you wanted.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi all
this code :-
Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress
help you If any press key on the form to get the char (e.KeyChar )
but if I make form hide and press any key press any key you cant get e.KeyChar...
my question if i make form hide or my application works on backgorund how can I get e.KeyChar ..
Thanks .
AMR
|
|
|
|
|
The form will not accept key events as it no longer has focus. A possible way to get around this to create a class/module that does specific processing when a key event is raised.
e.g. Create a module that does whatever it is you want done -
Option Strict On
Public Module basKeyEvents
'this class handles key events on every form
Public Sub DoWork()
'''Do work
End Sub
End Module
Then call that method from within the form when a key event is raised
Private Sub Form_KeyUp(....)Handles Me.KeyUp
If e.KeyCode = Keys.F12 Then
DoWork()
End If
End sub
Remember to set the forms KeyPreview property to True .
|
|
|
|
|
You could also try handling all of your apps key presses manually...If you go here:
http://www.codeproject.com/useritems/winSpriteLib.asp[^]
I have a keyboard manager that you could probably modify for this...
Pablo
Sometimes I think there's no reason to get out of bed . . . then I feel wet, and I realize there is.
|
|
|
|
|
I am using Process.Start to being another application which it does with no problem, but the new application is behind my current window. How can I get the new application to come to the front?
|
|
|
|
|
Instead of using Process.Start, try using the Shell command. Example:
<br />
Shell("C:\", AppWinStyle.MaximizedFocus, True)<br />
|
|
|
|
|
how to read data from excel file and save results to sql table
platform is vb.net for windows forms
|
|
|
|
|
Just create an oledb connection to excel sheet and read data either using data adapter or data reader and then fill the desired data to the sql using another sqlconnection. i think this my help
|
|
|
|
|
how to read data from excel file and save results to sql table
|
|
|
|
|
If you are working with Sql Server 2000 by using the enterprise manager we have to import the excel file data into the sql server.
|
|
|
|
|
hi!
I write this code
Dim grfx As Graphics = CreateGraphics()
in class, but class draw under the CreateGraphics()
how do class get to know CreateGraphics()?
urgently help mi?
thank you
|
|
|
|
|
ela_85 wrote: Dim grfx As Graphics = CreateGraphics()
in class, but class draw under the CreateGraphics()
how do class get to know CreateGraphics()?
urgently help mi?
That doesn't make any sense. Could you rewrite your request?
|
|
|
|
|
I think what your asking is how does it know what graphics to create? If so the answer is, because you are likely using a subclass of a control...like a form, or a button, or something along those lines...the Base class knows how to create its own graphics and when you call CreateGraphics() you are really calling Me.CreateGraphics() which would be your base class implementation of CreateGrapics unless you have overriden it.
In short, Microsoft designed controls that know how to draw themseleves, your just tying into that.
Pablo
Sometimes I think there's no reason to get out of bed . . . then I feel wet, and I realize there is.
|
|
|
|
|
I was trying to use Windows API calls from VB6 programs,
While those programs are running, there seems to be a hugh delay when tryning to open Word, or Excl files.
This is very conatant phenomena: every time one or more of the programs is running,
the open time goes from 1 sec to 10 and even about 30 sec.
Kill the offending process gets the lag back to about 1 sec.
Seems that API wait calls are not compatible with the VB runtime on XP SP/2.
Any ideas?
Example 1:
==========
I was trying to write a VB6 based Service. The following code should be paste into a module (no form)
(Based on a service example)
'-------------------------------------------- Start of code ------------------------------
Public Const INFINITE = &HFFFF ' Infinite timeout
Public Declare Function CreateEvent Lib "kernel32" Alias "CreateEventA" (ByVal lpEventAttributes As Long, ByVal bManualReset As Long,
ByVal bInitialState As Long, ByVal lpName As String) As Long
Public Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long
Private Sub Main()
Dim hEvent As Long
hEvent = CreateEvent(0, 1, 0, vbNullString)
WaitForSingleObject hEvent, INFINITE
End Sub
'-------------------------------------------- End of code ------------------------------
Example 2:
==========
Open a new VB6 project, paste the attached to the form, run it, and try to open any WORD file.
(I converted this to run as a timer, and it seems OK, but I'd like to know why it is so WRONG?)
'-------------------------------------------- Start ot code ------------------------------
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMillseconds As Long)
Private Sub Form_Load()
Do While (True)
DoEvents
Sleep 1000
Loop
End Sub
'-------------------------------------------- End of code ------------------------------
|
|
|
|
|
Hi all,
I want to record the browser events (like a user fills up a form over the internet). I want to record that using macros in vb.net. Anybody having some idea?
Thanks in advance
|
|
|
|
|
There are no such macros in VB.NET. You can't record what's going on in another application without writing some kind of application to do it. Probably using the Windows CBT Hook API's.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks Dave
I dont have any idea about these Windows CBT Hook API's. I searched a lot over the net bt all in vein. I think i should be more specific about what is needed? Actually i just want to record whatever user does with web page for example it should be able to record all the textboxes which a user fills on a webpage and should be able to generate some script (vbscript) accordingly.
|
|
|
|
|
The answer doesn't change. There is nothing that "records" what the user does, short of using the Windows CBT Hook. CBT stands for Computer Based Training. The hook calls your application before activating, creating, destroying, minimizing, maximizing, moving, or sizing a window; before completing a system command; before removing a mouse or keyboard event from the system message queue; before setting the input focus; or before synchronizing with the system message queue. Essentially, you get all the window, mouse, and keyboard messages before they are processed, enabling you to record them if you want.
The down side is that this is a complicated API to use and you MUST have an in-depth knowledge of how Windows works if you expect to use this API properly.
Documentation[^] on the CBTProc callback.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks Dave for your kind help, I'll go thru the documentation, once again thanks a lot
|
|
|
|
|
help guys... how can i store the .wmv file in ms access - database???
thanks!!!
|
|
|
|
|
hi,
i need to use split() but i need to split string depends on complete word such as "welcome" and i put split("welcome") but the problem that the string include just three welcome but it gave me more that 60 when i asked
lines.length-1
and when i but instead of welcome "w" letter and used split("w") it gave me the wanted value which is 3
i dont know why , i need to split whole word please help me
kilany
|
|
|
|
|
It looks like VB is "helpful" here, and automatically converts your string to an array of characters, so that you are splitting on any of the characters in the string, not the whole string.
Put the string in an array of strings and use the array in the call to Split.
If you only want to count the occurances, a Regex is better suited for this.
---
b { font-weight: normal; }
|
|
|
|