|
Greetings
As far as I know that is not possible. One way around is to create a temporary datatable with desired columns and copy the data there. This, however, does consume some amount of memory. It should not be an issue if the data is not very big.
Nothing else comes to my mind right now.
|
|
|
|
|
I'm trying to draw a single black border around my dialog using the following code:
Private Sub LogInDialog_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
Dim Rect As New Rectangle(e.ClipRectangle.X, e.ClipRectangle.Y, e.ClipRectangle.Width - 1, e.ClipRectangle.Height - 1)
e.Graphics.DrawRectangle(Pens.Black, Rect)
End Sub
I have a ComboBox control on the page along with some text fields and such. When I drop the ComboBox's List control, then contract it again, there are marks from where the listbox was (I can see it behind the other controls on the page below the ComboBox). I tried bringing the control to the front, but that didn't help. Any ideas?
Thanks in advance for any help.
Jamie Nordmeyer
Portland, Oregon, USA
|
|
|
|
|
Jamie Nordmeyer wrote:
Any ideas?
Yep, but I know there is a better solution, however this will work for you as I just tried it.
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Me.Refresh()
End Sub
Let me know, hope it helps.
Nick Parker
May your glass be ever full.
May the roof over your head be always strong.
And may you be in heaven half an hour before the devil knows you’re dead. - Irish Blessing
|
|
|
|
|
Hey there, Nick. Thanks for the reply. Actually, I figured it out at the end of the day yesterday, then promptly kicked myself. I was using the clipping rectange (e.ClipRectangle), which only specifies the area that needs updating, not the whole dialog (been doing ASP.NET stuff for the last year, so I forgot a few of my 'Windows programming rules'). Anyway, I changed all the e.ClipRectangle parts to DisplayRectangle (e.ClipRectangle.X to Me.DisplayRectangle.X), and it works great.
Again, thanks for thought.
Jamie Nordmeyer
Portland, Oregon, USA
|
|
|
|
|
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
|
|
|
|