try
{
goto Thailand;
FindNiceYoungGirl();
}
catch (EntryPointNotFoundException up)
{
throw up;
}
The FoZ
try
{
goto Thailand;
FindNiceYoungGirl();
}
catch (EntryPointNotFoundException up)
{
throw up;
}
The FoZ
That seems to be working thanks. Although I'm not sure if the Easter Break has done my PC some good. I'll make sure everything is update to. Hopefully my 2010 installation is causing any troubles. Cheers
The FoZ
Hi All This has been drving me insane. I have a user control that I am adding and removing controls from and want to see what it looks like on the main form. When I goto the main form the updates are not there. The same thing happens when I run the solution. Taking the control off and putting it on again doesn't work. Shutting down visual studio 2008 and re-opening it causes me to loose all of my changes. I found this article here[^] but it didn't fix my problem. I even deleted all copies of the dll I could find, checked the auto populate setting and when I went to the Choose Items... dialog, there was a reference to the dll in there as before. The form and user control are in the same DLL within the solution. Is there any way around it? Should I structure my project differently? Thanks for your help in advance
The FoZ
Cheers. I have managed to sort this out now and it all seems to work fine. Ended up buying a new machine and setting everything up on a VirtualBox Windows 7 VM with no problems Thanks for the responses
The FoZ
Thanks. My work mates will tell you i'm not the best searcher on the web! The solution that worked from that page was simple. When the message appears. Press back, then next again!
The FoZ
Hi All I have had a look on the android developer site and downloaded and installed everything in the correct order, but when I try and install the Android SDK it tells me I do not have the java JDK installed. The first time I installed the JDK I used version 7. I then realised it was the wrong version so I took it off and put on that latest 6 version. Still the Android SDK tells me I do not have the JDK. Getting a bit frustrated now and don't know where to turn. I downloaded and unzipped the Eclipse IDE for Java EE Developers, then the JDK on Windows Vista Basic edition. Any ideas. Cheers
The FoZ
Hi All I've been looking in to sending information to an application that is already open, the objective being for the app to behave like Excel when you have the app open and double click on a file in explorer. I came across this article http://msdn.microsoft.com/en-us/library/ms996475[^] but couldn't get it to work. To make it even more interesting(!) we need to deploy this over Citrix servers and the app itself is installed using Softgrid, so we may have an app running on one server that needs to see if an instance of another app is running on any server for that user and get it to open something else. Does anyone know if this is possible? We use .NET3.5 Thanks
The FoZ
I rebuilt it from scratch and here is what I found. In the DrawItem method, the design mode does not like it when I change the text of the tab. The line I found to cause the trouble is
this.TabPages[e.Index].Text = this.TabPages[e.Index].Text.Replace(tabText, string.Empty);
Looks like I am going to have to actively calculate the size of the tab which is probably the best way to go about it. If anyone can shed some light on the reason for this so I know why I shouldn't do it my original way, I would be grateful. Cheers
The FoZ
Thanks Johnny J I've had a look through and to be honest I'm not sure how it all works together. I'm having trouble getting it to work in 2008. I'm going to try and build it again from scratch by pasting in the code bit by bit and testing along the way. I was able to select the different tabs in design mode before lunch. I wonder what has happened. If I find out I will post it here. Cheers
The FoZ
Hi All. I have been developing my own OwnerDrawn TabControl so I can have a close button on the right hand side of the tab. All was going well thanks to some of the articles on CP and now it has stopped working in Design mode. When the control is used in the test form when the app is running, everything works as expected. In design mode I cannot switch tabs to add controls to them. Any ideas?
public class ClosableTabCtrl : TabControl
{
#region Private Members
private System.Windows.Forms.ImageList buttonImageList;
private bool showCloseButton = true;
private bool hideCloseButtonWhenOnlyOneTab;
private const string tabText = " ";
private int buttonImageIndex;
#endregion
public ClosableTabCtrl() : base()
{
buttonImageList = new ImageList();
buttonImageList.Images.Add((Image)new Bitmap(Resources.InactiveCross));
buttonImageList.Images.Add((Image)new Bitmap(Resources.ActiveCross));
buttonImageList.Images.Add((Image)new Bitmap(Resources.ClickedCross));
this.DrawMode = TabDrawMode.OwnerDrawFixed;
this.DrawItem += new DrawItemEventHandler(ClosableTabCtrl\_DrawItem);
this.MouseMove += new MouseEventHandler(ClosableTabCtrl\_MouseMove);
this.MouseLeave += new EventHandler(ClosableTabCtrl\_MouseLeave);
this.MouseClick += new MouseEventHandler(ClosableTabCtrl\_MouseClick);
this.MouseDown += new MouseEventHandler(ClosableTabCtrl\_MouseDown);
this.MouseUp += new MouseEventHandler(ClosableTabCtrl\_MouseUp);
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
}
void ClosableTabCtrl\_MouseUp(object sender, MouseEventArgs e)
{
if (MouseIsOverButton(e) && buttonImageIndex != 1)
{
buttonImageIndex = 1;
this.Invalidate();
}
}
void ClosableTabCtrl\_MouseDown(object sender, MouseEventArgs e)
{
if (MouseIsOverButton(e) && buttonImageIndex != 2)
{
buttonImageIndex = 2;
this.Invalidate();
}
}
void ClosableTabCtrl\_MouseClick(object sender, MouseEventArgs e)
{
if (MouseIsOverButton(e))
{
// TODO: raise the event
}
Hi Roger. I'm having trouble recreating your problem. I shoved two text boxes on a form and used the following code:-
double prev;
double dim1;
private void txtDim1\_Leave(object sender, EventArgs e)
{
prev = dim1;
dim1 = ValidateEntry(txtDim1);
if (dim1 != 0.0 & prev != dim1)
{
MessageBox.Show("Event Fired");
}
}
private double ValidateEntry(TextBox MyTextBox)
{
try
{
return Double.Parse(MyTextBox.Text);
}
catch (FormatException ex)
{
MessageBox.Show("Enter a valid numeric value" + ex.Message);
MyTextBox.Focus(); return 0.0;
}
}
private void txtDim1\_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == 13) { txtDim2.Focus(); }
}
and it worked as expected. Is there anywhere else in your code that you could be changing the value of txtDim1.
The FoZ
It is annoying but that is the limitations of the compact framework - Missing properties and methods so you have to be more creative! How about using a list as the source or failing that a generic routine to populate a combo box. Try posting in the Mobile forum. They may have more for you. Regards
The FoZ
If you now where the data ends, you will be able to create a range object that starts from the last row and finishes at the end of the spreadsheet then set the hidden property to true. Something like rangeToHide.EntireRow.Hidden = true;
The FoZ
Are they just the normal blank rows you get in any Excel spreadsheet? Or do they actual contain something and is making your workbook file size huge?
The FoZ
If the rows are at the end, you can find the row of the last cell that contains any data. In VBA it looks like this
Dim lastCell As Range
Set lastCell = Range("A1").SpecialCells(xlCellTypeLastCell)
From that you can work your way up deleting the blank rows. It still uses iteration but there are fewer.
The FoZ
If the blank rows are within the data, you can apply the auto filter within code to do this. It will leave you with the autofilter selectors on the sheet but it is the quickest method. Just record a macro of you doing the task and you will have the basis for the code.
The FoZ
try this article Professional Tag Editor for MP3 (ID3) and WMA[^] it does mp3 and WMA. Not sure for the WAV's tho.
The FoZ
Not sure what else I can give you. So I've shown you where the options are to change the Fonts & Colours of the text editor. Looking through the display items, I can only assume that the "Collapsible Text" is what you need. Google may be your friend in finding out what each display item is
The FoZ
Goto Tools - Options.. Expand the environment node and select fonts and colors. Have fun, there are loads to go through!
The FoZ
Hi John How about a property in the control that changes the layout based on the value i.e. myControl.Orientation = Orientation.Vertical
where the Orientation.Vertical
is an enum held within the control. Regards
The FoZ