|
Amazon[^] will ship you the books.
Group Policy takes up LARGE portions of these two books.
|
|
|
|
|
HI!
how can i convert "200706" string to datetime format? its actually 2007 June
cheers
|
|
|
|
|
DateTime.ParseExact("200607","yyyyMM", null)
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
will that be null or system.dbnull or shall i just do
Dim frmt As IFormatProvider
DateTime.ParseExact("200607","yyyyMM", frmt)
|
|
|
|
|
DBNull is a database null. What's in his code example is null, or Nothing in VB.
|
|
|
|
|
VB.NET 2005 (NET 2.0), Window Form, CheckedListBox
I want to reorder (move) single item inside one CheckedListBox, maybe even with autoscoll and draw a line where item will be inserted (like VB6).
sorry, but i search to inet over and over and read a lot of tutorials, it just killing me.
Any hint would be very great! Thanx!
|
|
|
|
|
can u please elaborate ur problem a little more?
|
|
|
|
|
I have a custom control that inherits from the menustrip, when i compile it, put it in a test form and run it, it says the compiled dll contains no reference to user control. Has anyone else had this issue and/or know how to fix it?
Posted by The ANZAC
|
|
|
|
|
Did you set a reference to the System.Windows.Forms.DLL in your control project?
|
|
|
|
|
where do you mean, set what reference where?
Posted by The ANZAC : "WWBD, What Would Buffy Do?" : "I don't know man, she's stronger than me"
|
|
|
|
|
Sorry, it says my dll doesn't contain any user control types, why is this happening? It's a menustrip dervied from the menustrip which is a user control...right? It's also throwing it as an argument exception.
Posted by The ANZAC : "WWBD, What Would Buffy Do?" : "I don't know man, she's stronger than me"
|
|
|
|
|
The ANZAC wrote: It's a menustrip dervied from the menustrip which is a user control...right?
Wrong. MenuStrip derives from ToolStrip, which derives from ScrollableControl, which derives from Control, not UserControl. No, they are NOT the same.
Sorry about the reference. You actually do have it set (Project/Properties/References tab).
Control is used if you want to make a new control from scratch, or add to the functionality of another control that derives from Control.
UserControl is usually used to create composite controls consisting of one of more other controls, that should be treated as a COMBINED unit. An example of a compsite control would be your own custom implementation of a NumericUpDown box (NOT inheriting from the existing NumericUpDown class.) You'd add a TextBox to your UserControl, and a couple of buttons for Up and Down.
What kind of project did you create to start coding this control?? If it was Windows Control Library, you picked the wrong project type. Pick a Class Library type instead, then all you have to do is change the code to read like:
Imports System.Windows.Forms
Public Class MyControl
Inherits MenuStrip
You'll have to set references to the System.Windows.Forms.dll and maybe the System.Drawing.dll, depending on what you're doing with the control.
You CAN fix your existing control. All you have to do is click on the "Show All Files..." button in the Solution Explorer, open your control's Designer.vb file and change the Inherits line from System.Windows.Forms.UserControl to System.Windows.Forms.MenuStrip
|
|
|
|
|
Hi guys.
How i can convert such a windows base address :
C:\Documents and Settings\Sina\My Documents\My Pictures\p1(2).jpg
to Dos style path like :
C:\docume~1\sina\mydocu~1\...
Tnx for your reply
-- modified at 17:21 Tuesday 22nd May, 2007
|
|
|
|
|
I believe GetShortPathName[^] will do what you need. I would like to think there is an easier way, but I am not aware of one.
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
tnx for your reply. But it's not the style i wanted. i want get full dos mode path like it:
C:\Docume~1\Sina\MyDocu~1\MyPict~1\p1~1.jpg
|
|
|
|
|
That IS the "DOS mode" path, as you call it.
|
|
|
|
|
I believe what I gave you should have given you the dos path, in the format that you showed. If it gave you something different please show me what it was, as I am confused how this isn't meeting your needs.
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
Wow.Great.
Tnx for your reply.
|
|
|
|
|
Having become lazy, I've done so much as to check MSDN.
Basically I have a panel, and a bunch of groupboxes which I would like on that panel.
The groupboxes are hidden/displayed and moved depending on the user instructions at runtime. It all worked great without the panel (simply on the form), but with it, it doesn't.
The panel contains a button to hide it, which no longer works, and the groupboxes don't appear in the panel, regardless of whether or not I have them in the panel within the designer.
My question isn't fix it but, is there some trick I've missed with panels, to make their contents display? It works, in that it displays the button and the button changes on mouseovers, but it doesn't work.
It seems that the panel doesn't redraw itself entirely, but I added some calls to refresh it after moving the panels which has no effect.
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.
|
|
|
|
|
Without some brief, relevant snippits of your code it would be hard to help you. Also, don't call yourself lazy, even if you are; admitting to being lazy, and yet expect that I, or anyone else here help you, seems insulting and as a general rule I tend not to help people who insult me.
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
The laziness was about me...because for the last 4 years (before I became more reliant on the internet) I could sit for hours testing and testing until it worked, or I came up with something better. This time I've given in because I know there are plenty of people out there who do nothing but use panels for their interface (and they work).
There's no code needed, I would expect.
All of the following was/is done at design-time.
There's a form. Upon that, are groupboxes. Without any panels, the groupboxes display and the buttons work fine (they execute their click events).
Then I added the panel, moved the groupboxes so that they were [definitely] in the panel, and the relevant buttons too. Now, the buttons appear but do nothing when clicking on them, and the groupboxes don't appear.
All of the groupboxes initially have their Visible property set to false. The buttons are visible.
Hopefully that's clear enough.
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 tried to duplicate your problem doing the following:
added a panel to a form
put a groupbox on the panel
put a button on the groupbox
set the visible property on all three to false.
set the visible property of all three to true on the for double click event of the form.
put messagebox.show("Test") in the click event of the button.
ran the app.
double clicked the form; The panel, groupbox, and button showed.
clicked the button and it worked.
The windows forms designed code for what I did is:
this.panel1 = new System.Windows.Forms.Panel();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.button1 = new System.Windows.Forms.Button();
this.panel1.SuspendLayout();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.groupBox1);
this.panel1.Location = new System.Drawing.Point(72, 56);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(400, 320);
this.panel1.TabIndex = 0;
this.panel1.Visible = false;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.button1);
this.groupBox1.Location = new System.Drawing.Point(32, 32);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(336, 264);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "groupBox1";
this.groupBox1.Visible = false;
//
// button1
//
this.button1.Location = new System.Drawing.Point(40, 48);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(88, 24);
this.button1.TabIndex = 0;
this.button1.Text = "button1";
this.button1.Visible = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// Form2
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(576, 469);
this.Controls.Add(this.panel1);
this.Name = "Form2";
this.Text = "Form2";
this.Load += new System.EventHandler(this.Form2_Load);
this.DoubleClick += new System.EventHandler(this.Form2_DoubleClick);
this.panel1.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
Review your forms designer code and see if you see anything weird. If not, try and duplicate your problem in the simplest possible way and outline it as I did above.
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
Having followed your guide (except, in VB this time ) I get the same results as you and I and any sane person would expect. I had a panel, a visible button which made an invisible groupbox, visible.
The original project still ain't working. The data's working, it seems that the panel can't handle things moving around inside of it.
Thanks for your time, but I'll go bury my head in some strange code for now. There's only so many psychologists willing to help frustrated programmers left.
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.
|
|
|
|
|
Something keeps tickling the tip of my brain. An odd problem I once had when dragging exising controls into a panel. Can't remember the details, but seem to remember (and it will be a huge pain to do this) that I ended up starting over and creating a new form and adding a panel and new controls in the panel and the problem cleared up. Meant I had to copy over all of the other code from the existing form and of course recreating the whole ui itself is a pain, but when you truely have given up it might be worth a try.
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
Funnily enough, I did just that last night. Had a second project, copied the form and relevant code over. It's the bare minimum to have it working as it was - still doesn't work though.
I daresay I could do it the long way around. There's 4 groupboxes causing problems and each has less than 10 controls on it. Nothing really complex, and there's not exactly a deadline.
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.
|
|
|
|
|