|
Your groupbox's (if I followed this thread correctly) are not in your panel controls. It can appear on top of or under the panel, but you didn't drop the groupbox from the Toolbox ON the panel. You dropped it on the form, then tried to move it into the panel. This just moves the groupbox over the top of the panel.
All you have to do is add the groupbox control(s) to the Panel's Controls collection:
Panel1.Controls.Add(myGroupBox)
|
|
|
|
|
Unfortunately, I made sure of it. Dragging them over, and then within the panel to the edge of it, it stops drawing outside of the panel. I also checked and the pnlPanels.Controls.Add() lines were all in the designer code, and that was what I got from MSDN - adding those lines to my Form_Load code.
Plus, sometimes (not always) when you drag a control within a panel or a groupbox, the cursor changes and a dotted box appears next to it. Not very obvious if you're working at speed though.
Yet another spam post on yet another forum!
I am the lazy one, who sleeps as it suits him, codes what he wishes, and has many years to look forward to.
I love being a student.
|
|
|
|
|
I've given up. The reason I needed the panel was because I wanted to use GDI to draw on the rest of the window and the panel seemed the easiest way of me not having to draw under the groupboxes. So I figured, dispose of the panel (well, delete it - it's not being created to be disposed :-P) and just add another (complex) rectangle to the GDI code.
Thanks anyway folks, but it seems like one of those bugs that just happens.
Yet another spam post on yet another forum!
I am the lazy one, who sleeps as it suits him, codes what he wishes, and has many years to look forward to.
I love being a student.
|
|
|
|
|
I just need to know how to pass my Date over with the # sign on each side of it. If I run this in the Qurey Builder it works as long as I put # on each side of my date.
So it needs to look something like this....
SQL = "DELETE FROM Pat20VisitDate WHERE (VisitMRNo = '" & MR & "') AND (VisitDate = "& #SelectedVisitDate# &")"
but I have the syntax wrong or something. Is this some type of formatting issue? Does anyone have any suggestions? Thanks in advance!
|
|
|
|
|
I believe you want this.
SQL = "DELETE FROM Pat20VisitDate WHERE (VisitMRNo = '" & MR & "') AND (VisitDate = #"& SelectedVisitDate &"#)"
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
Oh and sorry that I never got around to checking back on your post from yesterday. It's been a busy day.
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
Yes you are right about that SQL statement. I just had the # in the wrong place. I went back to my code and just tried everything until I got it.
Don't worry about not getting back to me. I got it figured out. Thanks for your help!!
|
|
|
|
|
|
If you used parameterized queries, you wouldn't have to worrdy about things like making sure the date is in the correct format, or if the # characters are in the correct place, or escaping other data in your parameters, ...
|
|
|
|
|
Hi Everyone:
Is there a way I can show the records I added and/or modified to a DataSet before I commit them to the database?
I think it is something like MyDataSet.GetChanges.
Cleako - BTW the problem with the dataset primary ID number being off didn't seem to make a difference when I wrote the data out to the SQL Server Database using the SQLDataAdapter.
Thanks,
Quecumber256
|
|
|
|
|
|
Thank you. I going to see if I can adapt it for my use.
Quecumber256
|
|
|
|
|
I need to download from an FTP site. There are an unknown # of files. I have code to download a single file at a time but have problems getting the file names. The error message is invalid username/password when I use Path.GetFiles(strPathName).
|
|
|
|
|
Let's see the code you're using to try and get the files. The Path class doesn't have a GetFiles method. The Path class doesn't work with FTP sites, so I don't know why you're using it.
|
|
|
|
|
As you can see, I tried a couple of different methods. I also tried some of these inside the FTP class after the logon. I also tried to FTP.Logon. The upload works, but I know the filename that I have createed for the upload.
'FTP.DownloadAllFiles(strSource, strDest)
'For Each fname In My.Computer.FileSystem.GetFiles(strSource)
' strDest = strDest & fname
' strSource = strSource & fname
'FTP.DownloadFile(strSource, strDest)
'If FTP.flag_bool Then
' ctr = ctr + 1
'End If
' Next
'Dim f1 As New FileIOPermission(FileIOPermissionAccess.Read, strSource)
'Dim f2 As New FileIOPermission(FileIOPermissionAccess.PathDiscovery, strSource)
'fname = Dir(strSource)
'My.Computer.FileSystem.CopyFile(strSource, strDest)
'Dim filenames() As String = Directory.GetFiles(strSource)
'Do While fname.Trim > " "
'For i = 0 To filenames.Length - 1
' fname = Path.GetFileName(filenames(i))
' strDest = strDest & fname
' strSource = strSource & fname
' FTP.DownloadFile(strSource, strDest)
' If FTP.flag_bool Then
' ctr = ctr + 1
' End If
' 'fname = My.Computer.FileSystem.GetName(strSource)
' 'Loop
'Next
|
|
|
|
|
Are you actually using this code? Because every line is commented out...
This code won't work at all. Your combining filesystem objects and methods with FTP ideas. There two just don't work together at all.
What is "FTP" as defined in your code? There is no definition nor a Dim statement showing what kind of object it is.
You're using .NET Framework 2.0, so there is an FtpClient class built in, which your code isn't using at all as far as I can tell. FtpClient docs[^]
|
|
|
|
|
FTP is the FTP class that I built for .NET 2003 (from an MSDN sample). The upload works. But the download needs a file name. The ftp site is in our network so it can be accessed as an ftp site or as a file (windows explorer or internet explorer). The code is commented out when I copied it because there are about 3 different (though similar) methods that I copied from samples I found in help or on-line.
|
|
|
|
|
I need help with a bug in a program for a PPC device.
The following line of code results in a “FormatExceptionWasUnhandled” error:
If Mid(DecimalPart, 1, 1) <> "1" Then
DecimalPart is a String variable containing the text “.5”.
When I set up a Watch for Mid(DecimalPart, 1, 1) the result is “.” and for Mid(DecimalPart, 1, 1) <> "1" the result is “True”.
I am sure I am missing something incredably simple, I just can not figure out what.
Thanks,
David Wilkes
|
|
|
|
|
The FormatException gets thrown when the formatting for an argument does match the parameter specifications of the method. There's nothing in this code that would throw that exception because the Mid function doesn't expect the string parameter to be in any format.
Besides, why are you using the old VB6 Mid function? You should be using the methods in the String class, like
If DecimalPart.StartsWith("1") Then
|
|
|
|
|
Thanks for the reply!
This is what I get for being lazy. Using MID? I was using a function someone else wrote (no sense reinventing the wheel right?). I figured out last night that it was part of the line just prior to this that was actually throwing the error (not used to this environment yet). When I stripped it down I figured out it was trying to do Val(".")
So I just did what I should have done from the start and write my own function.
David Wilkes
|
|
|
|
|
My co-worked and I have a debate going, he's trying to tell me that you cannot check to see if an event has been raised in VB.Net, is this true? If not does anyone have some examples I can look at?
"Okay, I give up: which is NOT a real programming language????"
Michael Bergman
"Well yes, it is an Integer, but it's a metrosexual Integer. For all we know, under all that hair gel it could be a Boolean."
Tom Welch
"Let's face it, the average computer user has the brain of a Spider Monkey."
Bill Gates
|
|
|
|
|
Unless you put code in your event handler to mark when it has been fired, I'm not aware of a way to tell if it was previously fired.
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
Yes and no, and this is not just a limitation of VB.NET. It's any lanugage that uses Windows Forms and handles events.
There is no log that says which events have fired when. There are only two ways to tell an event fired. The first is in the event handler (obviously!).
The second is to override WndProc and watch for the window message that will cause the event to fire inside your code.
|
|
|
|
|
Hello, I have a tiny tiny problem with this code.
It's a regex that grabs this kinda text
Text: Posted May 17,2005 08:30 AM
Code: ([Pp][Oo][Ss][Tt][Ee][Dd]\s[A-Za-z]*\s\d,\s[0-3000]\s[\d]:[\d]\s[A][M])
I can't see why it's not working, but I'm missing something in the code. Please help.
Thanks a lot!!!
Anthony.
Belief is a beautiful armour.
Knowledge is the sword.
|
|
|
|
|
regexlib.com[^] has a regex tester and cheat sheets, and is where I go with problems like this.
topcoderjax - Remember, Google is your friend.
|
|
|
|