|
How can I draw shapes like line, rectangle, circle in ASP.NET.
Please Help. Thanks in advance.
|
|
|
|
|
The Namespace System.Drawing isn't support, maybe you must look about SVG or Flash (SWF), the first it's a vector draw implementation that pretends to be standar in vector graphics, it's good.
----
hxxbin
|
|
|
|
|
Can someone please help me
I need to convert Wav files to mp3 and I need to do it in VB.
Is it possible?
Kev
|
|
|
|
|
yes its possible...u'll have to use a thitd party library....i can remember there is an exe named Lame. U can get this from net for free. Also check out some Ogg Dll's
rIsHaBh
|
|
|
|
|
Do any of you gurus know how to determine the Thickness of a Datagrid Row Separator, or more precisely, the amount of space between rows? I have RowDividerStyle set to dgbNoDividers. I need to be able to calculate the middle of a row in the Datagrid so that I can generate a click event on that row (don’t ask why ). I have the code working except for the space between rows.
Thanks in Advance,
nonGuru
|
|
|
|
|
I used 120 Twips or 6 points and that worked, but I don't know if it will remain at 6 points if I change the RowSize or Font Size.
|
|
|
|
|
I was just wandering how to use some custom Menus and or Forms. I was just wandering was were somethings that would allow me to customize. I was also wandering about incorporating flash. How much of a task is this?
|
|
|
|
|
Custom menus or forms, where? As Web Forms or as Windows Forms?
Sorry, I'm not much help with Flash.
|
|
|
|
|
Custom menus are quite easy. You only set the OwnerDraw property to "true", specify the size of the menu item in the "MesureItem" event method, and draw the menu item in the "DrawItem" event method.
To customize a form, you can set "FormBorderStyle" to "None", change the "Region" property to whatever you like and draw the borders on the form's canvas.
For Flash you have to use the web browser control.
|
|
|
|
|
I am developing a large word document template that presents the user with a user form front end, collects the data on completion at goes on to be built by one of many build routines. Intending it to appear as close to a standalone application (VB not allowed!) as possible and controlling the users interaction as tightly as possible, I have taken control of all exit operations toolbar and menu's, document hiding, version and naming conventions etc. What remains to totally stymie myself and collegues are:
Modal seemed best option to adopt, binding the form and the document and ensuring control focus, this however presents us with the scenario that any word documents already open are not accessible! Their on the taskbar but clicking yields no change in application or document activation. Unfortunately our users are not guarenteed IT competents so the best instructions in the world are not going to prevent them having documents open prior to opening our template, as well as the fact that this just shouldnt happen! Any help in a workaround enabling normal multi window operation would be appreciated. Obviously were the documents only available through the windows menu like the old days this query would be mute but hopefully....
Secondly I would also like the give the user a virtual minimize facility without resorting to form resizing! maybe by shooting the window off screen with a command button. How though can I get it back by for example using the task bar icon. I have explored the document and form event handlers (inc hooked events) to no avail.
My apologies for such a long and verbose posting. JasH
|
|
|
|
|
I've created my own ocx control (with 2 option buttons y & n). I inserted that control in my project.
My question:how do I find out the value (y or n) from conrol?
Thanks
|
|
|
|
|
Your control is going to have to expose this property. What you are probably looking to do in your control is when a button is clicked, the code that handles that button click sets a property in your control with a value that is unique to that button, say 1 for the Y button and 0 for N button. Then your application can check the value of the property for which button was clicked.
Another method would be to have your control fire an event that includes which button was clicked (as above) in its arguments. In your control, something like this: (not actual code!)
Public Event ButtonClicked(ByVal ButtonID as Integer)
Button handling code:
Private Sub YButton_Clicked(...)
RaiseEvent ButtonClicked(1)
End Sub
Private Sub NButton_Clicked(...)
RaiseEvent ButtonClicked(0)
End Sub
RageInTheMachine9532
|
|
|
|
|
If I understood you correct. I add the following code into my contorll porject and them created new ocx.
Private Sub optYes_Click()
optYes.Value = True
End Sub
Private Sub optNo_Click()
optNo.Value = True
End Sub
Private Sub UserControl_Initialize()
optNo.Value = False
optYes.Value = False
End Sub
However, when I am placing that control in my main project I still can't see selected value. Please help me.
|
|
|
|
|
Wait a minute... My mistake, I thought you were using two command buttons.
OK. An OCX means your using VB6...
What you have to do is expose (make Public) your own custom Property. What you would normally do is define an global variable used internal to your control, like m_OptionPicked. You use the optYes and optNo click events to set the value of that variable, either a number or some predefined Enumeration, whatever you want your Property to expose. I'll use an Enum to demonstrate:
' Setup our Public enumeration values
' These are the possible values of our controls property.
Public Enum ControlOptions
Undefined = -1
Yes = 1
No = 0
End Enum
' Internal variables (visible only inside the control!)
' Declaring as 'ControlOptions' will limit the value to
' the possible values of our Enumeration above.
Private m_OptionPicked as ControlOptions
Now, when an option button is clicked, you handle the Click event just as you have in your previous post, BUT you set the value of m_OptionPicked to one of the predefined values of ControlOptions, like this:
Private Sub UserControl_Initialize()
m_OptionPicked = ControlOptions.Undefined
End Sub
Private Sub optYes_Click()
m_OptionPicked = ControlOptions.Yes
End Sub
Private Sub optNo_Click()
m_OptionPicked = ControlOptions.No
End Sub
Almost done! Now you have to expose the internal variable as a Property of your control. You can do this using the Property statements. We're going to make a property called OptionPicked that your control exposes to its host. The code in the Property statement will just return the value of the internal variable m_OptionPicked. Once again, we'll declare that the value returned is one of the possible values of ControlOptions above.
Public Property Get OptionPicked() as ControlOptions
return m_OptionPicked
End Property
Since we have only a Property Get defined for OptionPicked, is automatically becomes a Read-Only property. That is, your application can only read the value of OptionPicked, it can't set a new value for it. If you wanted to do that, you would have to define a block of code for a Property Set statement so your control knows what to do with the new value:
Public Property Set OptionPicked( NewValue as ControlOptions )
m_OptionPicked = NewValue
' Some addition code to alter the status
' of the option buttons on screen should go here.
End Property
That's all there is to it! This is a little more code than required to expose the value of an option button, but more complex controls would follow this framework.
Let me know how it goes!
RageInTheMachine9532
|
|
|
|
|
I have some dificulty to compile tha code with the following lines:
Public Property Get OptionPicked() As ControlOptions
return m_OptionPicked
End Property
Public Property Set OptionPicked(NewValue As ControlOptions)
m_OptionPicked = NewValue
End Property
Please help me. Thanks
|
|
|
|
|
You have to include what the error/problem is!
RageInTheMachine9532
|
|
|
|
|
Return isn't supported in VB6. Try
Public Property Get OptionPicked() As ControlOptions
OptionPicked = m_OptionPicked
End Property I think you're OK with the Set part.
|
|
|
|
|
My bad! That's what I get for writting VB6 code from memory!
The fixed line should be:
Public Property Get OptionPicked() As ControlOptions
OptionPicked = m_OptionPicked
End Property
RageInTheMachine9532
|
|
|
|
|
Here is my code with your modification:
Option Explicit
Public Enum ControlOptions
Undefined = -1
Yes = 1
No = 0
End Enum
Private m_OptionPicked As ControlOptions
Private Sub UserControl_Initialize()
m_OptionPicked = ControlOptions.Undefined
End Sub
Private Sub optYes_Click()
m_OptionPicked = ControlOptions.Yes
End Sub
Private Sub optNo_Click()
m_OptionPicked = ControlOptions.No
End Sub
Public Property Get OptionPicked() As ControlOptions
OptionPicked = m_OptionPicked
End Property
Public Property Set OptionPicked(NewValue As ControlOptions)
m_OptionPicked = NewValue
End Property
And here is the error:
Compile error:
Definitions of property procedures for the same property are inconsistent, or property procedure has
an optional parameter, as ParamArray, or an invalid Set final parameter
|
|
|
|
|
Once again, my bad! Change the Set to Let:
Public Property Let OptionPicked(NewValue As ControlOptions)
m_OptionPicked = NewValue
End Property
The Set version is used for setting object references...
RageInTheMachine9532
|
|
|
|
|
It is not your bad it is my luck of knoledge that I can't figure out by myself.But I am learning
I was able to compile the ocx project and then use it in my main project, however I still can't see the value.
UserControl11.Value ????
|
|
|
|
|
Thats because it's called OptionPicked, not Value.
RageInTheMachine9532
|
|
|
|
|
I love you... Thanks for the help...
|
|
|
|
|
Hi there;
Can any one please help me on "how to Embed Progress Bars in a List Control".
Thanks;
|
|
|
|
|
Did you take a look at this example http://www.codeproject.com/listctrl/napster.asp?
|
|
|
|