|
Hello Jamie:
I am trying to do the similar thing. i need to draw a rectangle and fill with white color. Any idea? Thanks
Zulfikar Ali
|
|
|
|
|
From with a paint event handler, you can use
e.Graphics.FillRectangle(Color.White, Rect)
replacing Rect with the rectangle you want to fill. Did that answer your question?
Jamie.
Jamie Nordmeyer
Portland, Oregon, USA
|
|
|
|
|
Hi,
First, it is the first time I'm doing something in VB.
I have a problem :
I want to make a vb script to create a registry key in our buildAll.bat file, which is builing all our VC++ dlls/exes.
Here is my script :
<br />
Dim MyPath <br />
MyPath = CurDir<br />
Dim intDoIt<br />
intDoIt = MsgBox(MyPath)<br />
Set WshShell = WScript.CreateObject("WScript.Shell")<br />
WshShell.RegWrite "HKLM\SOFTWARE\Company\Product\InstallDir", MyPath<br />
As you can see, I'm trying to set the install path from the current path.
The problem is that the script doesn't works : the MyPath variable is empty.
Any idea ?
thanks in advance.
Stephane
www.exotk.org
|
|
|
|
|
forget it !
I created a win32 exe doing it.
Stephane
www.exotk.org
|
|
|
|
|
If you have the latest scripting engine (5.6), you can use the CurrentDirectory property of the Shell object:
Dim WshShell : Set WshShell = WScript.CreateObject("WScript.Shell")
Dim MyPath : MyPath = WshShell.CurrentDirectory
Dim intDoIt : intDoIt = MsgBox(MyPath)
WshShell.RegWrite "HKLM\SOFTWARE\Company\Product\InstallDir", MyPath
|
|
|
|
|
What is about MyPath = WScript.Path?
Or using WScript.ScriptFullName and WScript.ScriptName?
With best wishes,
Vita
|
|
|
|
|
Which attribute should I set?
Thanks
|
|
|
|
|
The following will ensure the form is kept on top:
Option Explicit
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, _
ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, _
ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Const HWND_TOPMOST = -1
Const SWP_SHOWWINDOW = &H40
Const SWP_DRAWFRAME = &H20
Private Sub Form_Load()
Dim retval As Long
retval = SetWindowPos(Me.hwnd, HWND_TOPMOST, 100, 100, 100, 100, SWP_DRAWFRAME Or SWP_SHOWWINDOW)
End Sub
|
|
|
|
|
In VB.NET, set the TopMost property to True.
In VB6, search MSDN for Q184297
lazy isn't my middle name.. its my first.. people just keep calling me Mel cause that's what they put on my drivers license. - Mel Feik
|
|
|
|
|
Hi Folks
I have got something for you to think about...the thing is i have a text file which contains huge dataset( delimited records). It has a trailer at the end which will have the record count and other relevant information about the text file.
Now i need to verify whether the record count mentioned in the trailer is correct.
i am right now doing this by looping through entire file and incrementing the count.
The issue is since this is a line by line read operation its taking hell alot of time.
These are the questions
Is there a way through which we can find how many lines in a file.
Is there a way to read the entire file as a stream in VB6.0.
Please help me asap
Best Regards
Venkatraman Kalyanam
Chennai - India
"Being Excellent is not a skill, it is an attitude"
|
|
|
|
|
You can use the FileSystemObject to do this.First of all, add a reference to "Microsoft Scripting Runtime". The add the followinf code (more or less) :
**********************************************************************
Dim FSys as New FileSystemObject
Dim txtStr as TextStream, iLine as Integer
Set txtStr = FSys.OpenTextFile (FileName)
Do While Not (txtStr.AtEndOfStream)
txtStr.SkipLine
Loop
iLine = txtStr.Line
**********************************************************************
This should be faster than reading the whole text file line by line
|
|
|
|
|
I need to make a VB 6.0 program to comunicate with MCS51 via ibm interfacing printer ports, any body got the code with explanation of how it works?
Thank for your help
|
|
|
|
|
I've created an addin in VB.Net using the Extensibility Projects/Shared Add-ins project wizard to start. Anyway I've finished everything and got the beast working just fine on my system, however I can seemd to get it to install and run on another system. I checked the registry keys and it appears that everything is there... I've been working on this for a few weeks and haven't seemed to make any progress and am running out of ideas. There must be something that I'm overlooking!
I tried using the VB setup and deployment project, as well as using Installshield Developer 7.04 to create installation projects. They all run fine, and like I said before, they ARE creating the registry keys.
Any ideas or suggestions,
Thanks!
-Steve
|
|
|
|
|
Does anyone have ANY suggestions? I'm getting desparate! <grin>
Thanks!!
-Steve
|
|
|
|
|
plz can any body help me how to get the IP address and LAN card address of the computer thru VB.NET
-thnx
|
|
|
|
|
|
Tdate is a class I defined.
Then in visual basic,how to define object from Tdate?
I find out "Dim td as new Tdate()" is popularly used,and I did not see "dim td as new Tdate"?
Where can I find that tutorial about how to define objects or variables in visual basic?
Thanks.
this is my signature for forums quoted from shog*9:
I can't help but feel, somewhere deep within that withered, bitter, scheming person, there is a small child, frightened, looking a way out.
|
|
|
|
|
There are several locations on MSDN:
|
|
|
|
|
Thanks for the links.
I will check it out right now.
this is my signature for forums quoted from shog*9:
I can't help but feel, somewhere deep within that withered, bitter, scheming person, there is a small child, frightened, looking a way out.
|
|
|
|
|
I'm trying to create a ''bar bill'',( access Database) which I will be able to click on a button in order to get person's name( which would appear in a textbox with data1)
and the list of things(in a listbox with data2) that that person has been purchased
Thank you
|
|
|
|
|
i am trying to display multi page .tiff file into a pic box. so i have a next button to go to the next page. so far i got this
Dim objImage As System.Drawing.Image = objImage.FromFile("C:\Projects\FaxView\appraisal.tif")
Dim objGuid As Guid
objGuid = (objImage.FrameDimensionsList(0))
Dim objDimension As System.Drawing.Imaging.FrameDimension = New System.Drawing.Imaging.FrameDimension(objGuid)
Dim objBmp As System.Drawing.Bitmap
With objBmp
.FromFile("C:\Projects\FaxView\multipage.tif")
.GetFrameCount(objDimension)
.SelectActiveFrame(objDimension, 1)
End With
it is giving me error: object is not set to object reference at .GetFramecount(objDimension)
any idea why it is saying that? thanks for your ehlp.
Zulfikar Ali
|
|
|
|
|
i figured it out. thanks
Zulfikar Ali
|
|
|
|
|
Ok, I've managed to use the AxMediaPlayer to display my video. Unfortunately, there is absolutely no help or documentation on the methods and properties for the media player. I want to disply the real time frames and/or time as the video is playing. This can be done by displaying the AxMediaPlayer1.CurrentPosition. What I need to figure out is how to update the display as the video is playing. Is this through an event, or do I update the display everytime the AxMediaPlayer1.CurrentPosition is changed? I'm not sure what is the best way to try and do this.
|
|
|
|
|
Ok. I'm a C++ programmer (with a little VB6 experience) that's recently started using VB.NET quite a bit. I have to ask this even though I feel pretty certain that I don't have to worry about it... but I'm not sure just how large the changes are from VB to VB.NET so here we go...
In VB.NET, if I use multiple Timer objects (the new one, not the Forms one) so I can have different times, is there any chance the timers could fire at the same time? Ie, VB.NET is still basically a single threaded application, right? Each run of a fired timer event will NOT be treated as a thread...? I'm just making sure. I'm thinking of doing something a certain way and some of the resources used in each timer are shared so I can't have them stepping on each other. Would another timer fire off while another one is running? Can I stop that behavior (if it exists) with some sort of locking mechanism like a Mutex in C++?
|
|
|
|
|
Are you talking about the System.threading.Timer?
If so, you should have a look at the MSDN regarding them. I just read this.
Use a TimerCallback delegate to specify the methods associated with a Timer. The methods do not execute in the thread that created the timer; they execute in a separate thread that is automatically allocated by the system
If you're talking about the System.Timers.Timer then you're also in trouble
Note The event-handling method may be called even after the Stop method is called. The event-handling method may run on one thread at the same time that a call to the Stop method runs on another thread. This might result in the Elapsed event being raised even after the Stop method is called. To prevent this, use the SignalTime property to compare the time the event was raised to the time the Stop method was called. If the event was raised after the Stop method was called, do not process the event.
Pete
Pete
Insert Sig. Here!
|
|
|
|