|
Hi,
I incorporated a PLK for my VSPackage. I followed the exact instructions for the PLK implementation as mentioned in the VSIP help (including registering it in the registry). I also verified the PLK info.
When I attempt to run the package (by running project in debug mode – F5, using /noVSIP switch), it gives me an error message “Package XX has failed to load properly…”. Half the time the spawned app just goes blank and hangs and does not even give the pakage load failure message.
However, it does not give any clue as to why the package load failed or what the problem is. Is there any way (any log or anything else) in which I can find out why the package is not loading properly? It does not even produce any trace messages to indicate till what point the load went through.
When I run the app in debug mode (using F5) but without the /noVSIP switch, it runs fine and I can trace through it.
Any help will be greatly appreciated.
Thanks.
|
|
|
|
|
I have created a .NET control that sets its Dock property to DockStyle.Top and the intent is that it will always fill the top of its parent form (it's a toolbar). However, if other controls on the form hosting the control have their Dock property set to something other than DockStye.Nothing my control doesn't always fill the top of the parent form. It depends on what order the controls are added to the form in. For example, if I add a control with its Dock property set to DockStyle.Left then add my new control to the page (the one that's supposed to be at the top), then the new one docks at the top of the form but to the right of the first control.
Do any of you know how I can write my new custom control in such a way that it is always at the top of its parent form?
Thanks for your help.
Rhy Mednick Heart,Soul, Flesh, and Bones
Chicken Scratch Software Because typing is for sissieshttp://www.ChickenScratchSoftware.com
|
|
|
|
|
I'm not sure exactly, but here is an idea you could try.
Use the LocationChanged handler of your control. Whenever that is called, check to see it is on top. If it isn't... Change it's location to 0,0 or send it to the back (hack should make it appear on top).
Like I said, I've never done it before, but I hope this gives you some ideas.
Aaron Eldreth
TheCollective4.com
My Articles
While much is too strange to be believed,
Nothing is too strange to have happened.
- T. Hardy
|
|
|
|
|
Hello!
Im a Java developer who wants to switch to .NET stuff.
I was working using Jakarta Struts (J2EE framework), it is very nice and elegant. So, I wonder if there is a framework like that using .NET technology, including Web Apps and Desktop Apps, for example, a database layer pattern, business processes patterns, an so on.
Thanks!!!
|
|
|
|
|
|
I have a book that I am still working my way through, but looks promising. Its called "Expert One-on-One Visual Basic .NET Business Objects",
by Rockford Lhotka. It presents a comprehensive framework that should be useful for a wide range of applications.
|
|
|
|
|
Rocky complicates things WAY too much imho. He simply reinvents the wheel with every object he creates. The CSLA is not using all that .NET has to offer imho.
We have developped a way better 3-tier architecture internally that uses datasets. It is a lot quicker to code and easier to use!
My 0.02$
|
|
|
|
|
I have a PictureBox on a Panel,
I want my PictureBox can move on the Panel by the mouse,
my mouse's drag and drop just change the position of the PictureBox,
I know it's a simple question but I can't find any examples,
Can anyone tell me where I can find a example...??
|
|
|
|
|
<br />
Dim Xstart As Integer<br />
Dim Ystart As Integer<br />
Dim movin As Boolean<br />
Const Increment As Integer = 10<br />
Const TrueMotion As Boolean = False<br />
Const MOE As Integer = 5<br />
Private Sub Panel_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pnlMain.MouseMove<br />
If movin Then<br />
Dim ThisPanel As Panel = CType(sender, Panel)<br />
Dim moveX As Integer<br />
Dim moveY As Integer<br />
If TrueMotion Then<br />
moveX = Me.MousePosition.X - Xstart<br />
moveY = Me.MousePosition.Y - Ystart<br />
Else<br />
moveX = Me.MousePosition.X - Xstart - ((Me.MousePosition.X - Xstart) Mod Increment)<br />
moveY = Me.MousePosition.Y - Ystart - ((Me.MousePosition.Y - Ystart) Mod Increment)<br />
End If<br />
ThisPanel.Top = moveY<br />
ThisPanel.Left = moveX<br />
pnlBlack.Left = ThisPanel.Left - pnlWhite.Left<br />
pnlBlack.Top = ThisPanel.Top - pnlWhite.Top<br />
If ThisPanel.Top + MOE >= pnlWhite.Top And ThisPanel.Top - MOE <= pnlWhite.Top And ThisPanel.Left + MOE >= pnlWhite.Left And ThisPanel.Left - MOE <= pnlWhite.Left Then<br />
Label1.Visible = True<br />
Else<br />
Label1.Visible = False<br />
End If<br />
End If<br />
End Sub<br />
<br />
Private Sub Panel_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pnlMain.MouseDown<br />
movin = True<br />
Dim ThisPanel As Panel = CType(sender, Panel)<br />
ThisPanel.BorderStyle = BorderStyle.FixedSingle<br />
Xstart = Me.MousePosition.X - ThisPanel.Left<br />
Ystart = Me.MousePosition.Y - ThisPanel.Top<br />
End Sub<br />
<br />
Private Sub Panel_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pnlMain.MouseUp<br />
movin = False<br />
Dim ThisPanel As Panel = CType(sender, Panel)<br />
ThisPanel.BorderStyle = BorderStyle.None<br />
If ThisPanel.Top + MOE >= pnlWhite.Top And ThisPanel.Top - MOE <= pnlWhite.Top And ThisPanel.Left + MOE >= pnlWhite.Left And ThisPanel.Left - MOE <= pnlWhite.Left Then<br />
Me.Close()<br />
End If<br />
End Sub<br />
<br />
Private Sub btnNewPanel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNewPanel.Click<br />
Dim Newpanel As System.Windows.Forms.Panel<br />
Newpanel = New System.Windows.Forms.Panel()<br />
Newpanel.Location = New System.Drawing.Point(50, 50)<br />
Newpanel.BackColor = System.Drawing.Color.FromArgb(255, 192, 192)<br />
Newpanel.Size = New System.Drawing.Size(40, 40)<br />
Me.Controls.Add(Newpanel)<br />
AddHandler Newpanel.MouseUp, AddressOf Panel_MouseUp<br />
AddHandler Newpanel.MouseDown, AddressOf Panel_MouseDown<br />
AddHandler Newpanel.MouseMove, AddressOf Panel_MouseMove<br />
End Sub<br />
Aaron Eldreth
TheCollective4.com
My Articles
While much is too strange to be believed,
Nothing is too strange to have happened.
- T. Hardy
|
|
|
|
|
Thank you very much ~
I forget to say I use C# language...
I read your code and mostly know what I should do in every event handler,
but I still have some questions,
1.
During MouseMove,if I don't use a ---(dot line) Rectangle,
would the picture in the PictureBox flicker...??
And how to draw the Rectangle...??
2.
And mouse events should be write in the PictureBox_MouseXX or Panel_MouseXX...??
Thank you for your answer
|
|
|
|
|
When the application is running,how can i update the componets (dlls)the app used?
thanks a lot
|
|
|
|
|
How can make the tcpchannel stop listening the port without stop de application?
Thanks a lot!
|
|
|
|
|
hi,
You can do so by using :
System.Runtime.Remoting.Channels.Tcp.TcpChannel().StopListening();
method...
Hope this solves your prob...
regards,
Aryadip.
Cheers !! and have a Funky day !!
|
|
|
|
|
o, thanks for your replying!
but it seems do not work as expected!
the port is still open,then i use System.Runtime.Remoting.Channels.ChannelServices.UnregisterChannel ,and it's ok!
thanks a lot,my dear friend!
|
|
|
|
|
It might have worked but it doesnt seem to be the correct procedure. The next time you need the tcpchannel to listen again then you have to register it. Succedding calls mean registering and unregistering the channel and thats quite tedious process and surely wud entail performance penalty. Is there other way we cud do that?
|
|
|
|
|
I cant debug my project, as it is opened in a readonly mode. Does anyone know how to turn off the readonly mode? privileges??
I am logged in as Administrator.
|
|
|
|
|
hi,
As far as I guess, a project can go into readonly mode probably in 2 senarios...
one: The project is on a network drive and somebody else is already accessing the project
Two : The project is "checked in" in VSS or any other source control.
In possibility no :2 all you need to do is go to the project folder, select all the files and right click to get properties.
In property window uncheck the readonly attribute and you are done.
Hope this solves your problem... sorry if I'm wrong...
regards,
Aryadip.
Cheers !! and have a Funky day !!
|
|
|
|
|
I have a question about PictureBox:
I use a PictureBox to show my picture,
Now if I want to insert some small pictures on it,
I am not sure how many pictures will be inserted,
How can I show and save the positions of these pictures,
then I can show it next time...??
Please give me a hand,thanks a lot ~
ps.I use C# language
|
|
|
|
|
First, this should have been posted in the C# forum.
I use a PictureBox to show my picture,
Now if I want to insert some small pictures on it,
I am not sure how many pictures will be inserted,
How can I show and save the positions of these pictures,
then I can show it next time...??
The easiest way to do this would be using GDI+. You can draw each little picture separately, and store their positions in arrays. Then when the form closes, save the array into a textfile.
Aaron Eldreth
TheCollective4.com
My Articles
While much is too strange to be believed,
Nothing is too strange to have happened.
- T. Hardy
|
|
|
|
|
When I make an installer project I get a set of files that have to be either zipped or packaged somehow. Is it possible to use .NET to make a setup .exe only containing everything I need?
|
|
|
|
|
You should create a project whose type is a setup project. By doing so you can assign the files needed to get installed by using the filesystem editor(the area where you can see the application folders and the likes...). When you build the project it will create a setup.exe and its equivalent .msi file. Both are executable files
|
|
|
|
|
i have the same problem, when i made a new deployment prject..on build i must exclude the .net framwork from the project, so i must install it separete on the client machine, have u got any way to include the dot net framwork on the project? else i want to include the internet explorere update and the mdac 7.2
|
|
|
|
|
http://www.codeproject.com/dotnet/dotNetInstaller.asp?target=bootstrapper
It seems to be the program going around to install the .NET framework with our applications.
|
|
|
|
|
Does anyone know how to set environment variables in .NET?
|
|
|
|
|
The System.Environment class has methods to read the environment variables. However, this class has no method to set the environment variables for the current process.
To work around this problem, use the interop services to set the environment variables. Use SetEnvironmentVariable function.
ex
using System;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
namespace SetEnv
{
///
/// Summary description for Class1.
///
public class SampleSetEnvironmentVariable
{
// Import the kernel32 dll.
[DllImport("kernel32.dll",CharSet=CharSet.Auto, SetLastError=true)]
[return:MarshalAs(UnmanagedType.Bool)]
// The declaration is similar to the SDK function
public static extern bool SetEnvironmentVariable(string lpName, string lpValue);
public SampleSetEnvironmentVariable()
{
}
public static bool SetEnvironmentVariableEx(string environmentVariable, string variableValue)
{
try
{
// Get the write permission to set the environment variable.
EnvironmentPermission environmentPermission = new EnvironmentPermission(EnvironmentPermissionAccess.Write,environmentVariable);
environmentPermission.Demand();
return SetEnvironmentVariable(environmentVariable, variableValue);
}
catch( SecurityException e)
{
Console.WriteLine("Exception:" + e.Message);
}
return false;
}
}
class MyClass
{
///
/// The main entry point for the application.
///
[STAThread]
static void Main(string[] args)
{
// Create a sample environment variable and set its value (for the current process).
SampleSetEnvironmentVariable.SetEnvironmentVariableEx("TESTENV", "TestValue");
// Verify that environment variable is set correctly.
Console.WriteLine("The value of TESTENV is: " + Environment.GetEnvironmentVariable("TESTENV"));
}
}
}
Hi all this is Deeps..
|
|
|
|